package com.zmovie.front.config;

import com.zmovie.front.interceptor.UserLoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 挚爱之夕
 * @version 1.0
 * @implSpec 配置
 * @since 2023-11-27 19:29
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    //配置拦截器
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //后台
        registry.addInterceptor(new UserLoginInterceptor())
                //以下需要权限
                .addPathPatterns("/chooseSeat")
                .addPathPatterns("/pay")
                .addPathPatterns("/user/space")
                .order(1);
    }
}
